package Client;

import java.awt.Font;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;

//import Client.GetNumberOfStudent;

public class SumMenu extends JFrame {
	public static void PutMenu() {

		int x = 200, y = 200, width = 400, height = 400;
		final JFrame j = new JFrame();
		j.setTitle("已统计过单词的人");
		j.setLayout(new GridLayout(10, 1));
		JMenuBar jb = new JMenuBar();
		j.add(jb);
		JMenu jm = new JMenu("功能");
		jb.add(jm);
		JMenuItem jm1 = new JMenuItem("输入文件并进行统计");
		JMenuItem jm2 = new JMenuItem("查看进行词频统计的人");

		ActionListener al = new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				String buttonString = e.getActionCommand();
				if (buttonString.equals("输入文件并进行统计"))
					new upload();
				if (buttonString.equals("查看进行词频统计的人"))
					new GetNumberOfStudent().ss();
			}
		};
		jm1.addActionListener(al);
		jm2.addActionListener(al);

		jm.add(jm1);
		jm.add(jm2);

		j.setBounds(x, y, width, height);
		j.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		j.setVisible(true);

	}

	private static void setTitle() {
	}

}